#include "TestWindow.h";

TestWindow::TestWindow(SdkTrayManager *mTrayMgr)
{
	this->mTrayMgr = mTrayMgr;

	windowCaption = mTrayMgr->createLabel(OgreBites::TL_LEFT, "TTestWindowCaption", "Test events:", 350);

	fireButton = mTrayMgr->createButton(OgreBites::TL_LEFT,"TFireButton","Fire water emitters",250);
	staticButton = mTrayMgr->createButton(OgreBites::TL_LEFT,"TStaticButton","Set emitters to static",250);
	snowButton = mTrayMgr->createButton(OgreBites::TL_LEFT,"TSnowButton","Increase snow level",250);
}

//------------------------------------------------------------------------------------------

TestWindow::~TestWindow(void)
{
}

//-------------------------------------------------------------------------------------------

void TestWindow::show(void)
{
	mTrayMgr->moveWidgetToTray(windowCaption,OgreBites::TL_LEFT);
	windowCaption->show();
	mTrayMgr->moveWidgetToTray(fireButton,OgreBites::TL_LEFT);
	fireButton->show();
	mTrayMgr->moveWidgetToTray(staticButton,OgreBites::TL_LEFT);
	staticButton->show();
	mTrayMgr->moveWidgetToTray(snowButton,OgreBites::TL_LEFT);
	snowButton->show();
}

//-------------------------------------------------------------------------------------------

void TestWindow::hide(void)
{
    mTrayMgr->removeWidgetFromTray(windowCaption);
	windowCaption->hide();
	mTrayMgr->removeWidgetFromTray(fireButton);
	fireButton->hide();
    mTrayMgr->removeWidgetFromTray(staticButton);
	staticButton->hide();
	mTrayMgr->removeWidgetFromTray(snowButton);
	snowButton->hide();

}